package org.dandsoft.blackbox;

/**
 * User: dvilyuzhanin
 * Date: 16.01.2009 17:03:47
 */
public class Clock {

    private Time currentTime;

    public Clock(Time currentTime) {
        this.currentTime = currentTime;
    }

    public Clock() {
        currentTime = Time.NULL;
    }

    public synchronized Time next() {
        return currentTime = currentTime.incrent();
    }

    public Time getCurrentTime() {
        return currentTime;
    }
}
